<%@page import="com.drerp.RH.Cargo"%>
<%@page import="com.drerp.RH.ferias.Ferias"%>
<%@page import="com.drerp.RH.ferias.DAO.FeriasDAO"%>
<%@page import="com.drerp.RH.DAO.CargoDAO"%>
<%@page import="com.drerp.RH.Colaborador"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.util.GregorianCalendar"%>
<%@page import="com.drerp.util.Constantes"%>


<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="StyleSheet" href="../styles.css" type="text/css" media=screen />

<title>Aprovar Ferias</title>

</head>

<%
	Long ferias_id = Long.parseLong(request.getParameter("ferias_id"));

	
	FeriasDAO feriasDAO = new FeriasDAO();
	Ferias ferias = feriasDAO.findById(Ferias.class, ferias_id);
	ferias.setAprovada(true);
	
	feriasDAO.save(ferias);
%>

<body>

<%
		request.getSession().setAttribute(Constantes.SUCCESSS_MSG_SESSION_KEY, "Ferias aprovadas.");
		response.sendRedirect("lista.jsp");
%>
</body>